package com.hnevc.caoliuye;

import java.util.Scanner;

public class Homework {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入两只骆驼的年龄：");//输出骆驼的年龄的值
        int a = sc.nextInt();
        int b = sc.nextInt();//定义数值
        for (int i = a; i <= a * b; i++) {//i小于两个值相乘
            if (i % a == 0 && i % b == 0) {
                System.out.println("最小公倍数为：" + i);
                break;//确定后跳出循环
            }

        }
    }
}
